package com.github.thinwonton.springboot.showcase.mybatisplus.payment.service;

import com.github.thinwonton.springboot.showcase.mybatisplus.account.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * PaymentService
 *
 * @author hugo
 * @date 2018/8/22
 */
@Service
public class PaymentService {
    @Autowired
    private AccountService accountService;

    @Transactional(rollbackFor = Exception.class)
    public void pay() {
        accountService.createAccount();
    }
}
